﻿using DAL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
using System.Data;
/*************************************************************************************

     调拨相关操作  liudan add
  
*************************************************************************************/

namespace BLL
{
    public class ICAllocationBLL
    {
        private ICAllocationDAL IcaDal = new ICAllocationDAL();

        /// <summary>
        /// 获取调拨单列表
        /// </summary>
        public DataSet GetICAllocation(string states)
        {
            return IcaDal.GetICAllocation(states);
        }
        /// <summary>
        /// 查询调拨单是否有没有扫描的
        /// </summary>
        public DataSet Selissmwc(string FBrNo)
        {
            return IcaDal.Selissmwc(FBrNo);
        }
        /// <summary>
        /// 调拨出未审核明细
        /// </summary>
        public DataSet GetICADetailOut(string FBrNo)
        {
            return IcaDal.GetICADetailOut(FBrNo);
        }
        /// <summary>
        /// 调拨入未完成明细
        /// </summary>
        public DataSet GetICADetailIn(string FBrNo)
        {
            return IcaDal.GetICADetailIn(FBrNo);
        }
       
        //获取仓位名称
        public string JudgePlaceName(string FBrNo, string PkgsBarCode, string PlaceBarCode, out string PlaceName)
        {
            return IcaDal.JudgePlaceName(FBrNo, PkgsBarCode, PlaceBarCode, out PlaceName);
        }

        /// <summary>
        /// 盘点调拨明细信息
        /// </summary>
        public bool UpdateICADetail(string FBrNo,string PkgsBarCode, string NStockID, string cwname,string flnor, string states)
        {
            return IcaDal.UpdateICADetail(FBrNo,PkgsBarCode, NStockID, cwname, flnor, states);
        }
        /// <summary>
        /// 调拨出  扫码获取明细信息
        /// </summary>
        public bool GetICAOut(string FBrNo, string PkgsBarCode, out string FEntryNo, out string ItemSku, out string PlaceName)
        {
            return IcaDal.GetICAOut(FBrNo, PkgsBarCode, out FEntryNo, out ItemSku, out PlaceName);
        }
        /// <summary>
        /// 调拨入  扫码获取明细信息
        /// </summary>
        public bool GetICAIn(string FBrNo, string PkgsBarCode, out string FEntryNo, out string skname, out string NStockID)
        {
            return IcaDal.GetICAIn(FBrNo, PkgsBarCode, out FEntryNo, out skname, out NStockID);
        }
        /// <summary>
        /// 查询包装条码在库存状态
        /// </summary>
        /// <param name="PkgsBarCode"></param>
        /// <param name="Starte"></param>
        /// <returns></returns>
        public bool GetStkis(string PkgsBarCode, out string Starte)
        {
            //string FEntryNo = ""; string skname = ""; string NStockID = "";
            return IcaDal.GetStkis(PkgsBarCode, out Starte);
        }
        /// <summary>
        /// 调拨出  审核调拨单
        /// </summary>
        public bool ExamineICA(string fBrNo, string fExamineID)
        {
            return IcaDal.ExamineICA(fBrNo, fExamineID);
        }
        /// <summary>
        /// 调拨出  完成调拨单
        /// </summary>
        public bool FinishICA(string fBrNo)
        {
            return IcaDal.FinishICA(fBrNo);
        }
        /// <summary>
        /// 调拨入库同步到金蝶
        /// </summary>
        /// <param name="fBrNo"></param>
        /// <returns></returns>
        public int filishDiaobojd(string fBrNo)
        {
            return IcaDal.filishDiaobojd(fBrNo);
        }

    }
}
